#include<stdio.h>
struct fun
{
	int hang;
	int lie;
	int shuzhi;
};
int main()
{
	int m,n;
	scanf("%d%d",&m,&n);
	int arr[m][n];
	for(int i=0;i<m;i++)
	{
		for(int j=0;j<n;j++)
		{
			scanf("%d",&arr[i][j]);
		}
	}
	int max;
	int t=0;
	int count=0;
	struct fun value[m*n];
	for(int i=1;i<m-1;i++)
	{
		for(int j=1;j<n-1;j++)
		{
			if(arr[i][j]>arr[i][j-1]&&arr[i][j]>arr[i][j+1]&&arr[i][j]>arr[i-1][j]&&arr[i][j]>arr[i+1][j])
			{
				value[t].shuzhi=arr[i][j];
				value[t].hang=i+1;
				value[t].lie =j+1;
				t++;
				count++;
			}
		}
	}
	if(count==0)
	{
		printf("None %d %d",m,n);
	}
	else
	{
		for(int k=0;k<count;k++)
		{
			printf("%d %d %d\n",value[k].shuzhi,value[k].hang,value[k].lie);
		}
	}
} 
